<template>
    <view class="wrapper">
        <view class="nav-bar">
            <view class="status_bar"></view>
            <view class="container flex-row">
                <navigator open-type="switchTab" url="/pages/home/index">
                    <view class="back"></view>
                </navigator> 
                <view class="title">{{ title }}</view>
                <!-- #ifdef H5 || APP-PLUS  -->
                <view class="search"></view>
                <!-- #endif -->
            </view>
        </view>
        
    </view>
</template>

<script>
export default{
    name: 'NavigationBar',
    props:{
        title:{
            type: String
        }
    },
    mounted() {
        // console.log(getCurrentPages());
    }
}
</script>

<style lang="stylus" scoped>
    .wrapper
        padding-top calc(var(--status-bar-height) + 100rpx)
        .nav-bar
            position fixed
            z-index 99
            top 0
            width 100%
            background #f2f2f2
            .container
                height 100rpx
                padding 0 21rpx
                .back
                    width 52rpx
                    height 52rpx
                    background url('')
                    background-size cover
                .title
                    flex 1
                    font-size 32rpx
                    color #666
                    // #ifdef MP-WEIXIN
                    text-indent -52rpx
                    // #endif
                    text-align center
                .search
                    width 62.5rpx
                    height 62.5rpx
                    background url('')
                    background-size cover
</style>
